#pragma once
#include "CDependencyObject.h"
#include "REQUEST.h"

class CAccessibilityObject :
	public CDependencyObject
{

public: 
	CAccessibilityObject(CCoreServices * pCore);
	virtual ~CAccessibilityObject();
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual HRESULT InitInstance();
	virtual XUINT32 GetTypeIndex() const;
	virtual HRESULT AddEventListener(CDependencyProperty * pdp, CValue * pValue, XINT32 iListenerType, CValue * pResult, XINT32 fHandledEventsToo);
	virtual HRESULT RemoveEventListener(CDependencyProperty * pdp, CValue * pValue);
	void FirePerformActionEvent();
	static HRESULT Title(struct IDependencyObject * pObject, XUINT32 cArgs, CValue * ppArgs, CValue * pResult);
	static HRESULT Description(struct IDependencyObject * pObject, XUINT32 cArgs, CValue * ppArgs, CValue * pResult);
	static HRESULT Action(struct IDependencyObject * pObject, XUINT32 cArgs, CValue * ppArgs, CValue * pResult);
private: 
	void SentAccessibilityNotification(enum AccessibilityEvent event);
	static HRESULT SetResult(CXString * val, CValue * pResult);
public: 
	CXString * m_pstrTitle;
	CXString * m_pstrDescription;
	CXString * m_pstrDefaultAction;
	bool m_TitleSet;
private: 
	CXcpList<REQUEST> * m_pEventList;
};